import { request } from '@umijs/max';
import * as API from "@/services";
export async function queryDicts(params?: API.DictPageQueryParams): Promise<API.RespPageResult<API.Dict>> {
    return request('/api/v1/dict', {
        params,
    });
}

export async function queryDict(bizId: API.EntityId): Promise<API.RespResult<API.Dict>> {
    return request(`/api/v1/dict/${bizId}`);
}

export async function queryDictsByDictTypeId(dictTypeId: API.EntityId): Promise<API.RespListResult<API.Dict>> {
    return request(`/api/v1/dict/dict-type-id/${dictTypeId}`);
}
export async function queryDictsByDictTypeIdDictVal(dictTypeId: API.EntityId, dictVal: API.Dict['name']): Promise<API.RespListResult<API.Dict>> {
    return request(`/api/v1/dict/dict-type-id/${dictTypeId}/dict-val/${dictVal}}`);
}
